#include "Log.hpp"

using namespace LogModule;

int main()
{
    //std::unique_ptr<LogStrategy> strategy = std::make_unique<ConsoleLogStrategy>();
    // std::unique_ptr<LogStrategy> strategy = std::make_unique<FileLogStrategy>();
    // strategy->Synclog("test log!");

    Enable_Console_Log_Strategy();
    LOG(LogLevel::DEBUG) << "test 1: " << 3.141;
    LOG(LogLevel::DEBUG) << "test 2: " << 123;

    Enable_File_Log_Strategy();
    LOG(LogLevel::DEBUG) << "test 3: " << 234;
    LOG(LogLevel::DEBUG) << "test 4: " << 777;

    //文件名可通过宏__FILE__获取，行号可通过__LINE__获取
    // Enable_Console_Log_Strategy();
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world," << 3.14 << " " << 8899 << "aaaa";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world";
    // logger(LogLevel::DEBUG, "main.cc", 10) << "hello world";


    return 0;
}